
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Reference documentation &#8212; Pyment 0.3.2 documentation</title>
    <link rel="stylesheet" href="_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '0.3.2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true,
        SOURCELINK_SUFFIX: '.txt'
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Source code documentation" href="pyment_doc.html" />
    <link rel="prev" title="Welcome to Pyment’s documentation!" href="index.html" /> 
  </head>
  <body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="pyment_doc.html" title="Source code documentation"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="index.html" title="Welcome to Pyment’s documentation!"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">Pyment 0.3.2 documentation</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="reference-documentation">
<h1><a class="toc-backref" href="#id2">Reference documentation</a><a class="headerlink" href="#reference-documentation" title="Permalink to this headline">¶</a></h1>
<p>Pyment: the docstrings manager (creator/converter)</p>
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#reference-documentation" id="id2">Reference documentation</a><ul>
<li><a class="reference internal" href="#introduction" id="id3">Introduction</a><ul>
<li><a class="reference internal" href="#how-does-it-work" id="id4">How does it work</a></li>
<li><a class="reference internal" href="#what-are-the-supported-formats" id="id5">What are the supported formats</a></li>
<li><a class="reference internal" href="#customization" id="id6">Customization</a></li>
</ul>
</li>
<li><a class="reference internal" href="#using-pyment" id="id7">Using Pyment</a><ul>
<li><a class="reference internal" href="#how-to-install" id="id8">How to install</a></li>
<li><a class="reference internal" href="#how-to-run" id="id9">How to run</a></li>
</ul>
</li>
<li><a class="reference internal" href="#configuration-file" id="id10">Configuration file</a></li>
<li><a class="reference internal" href="#examples" id="id11">Examples</a><ul>
<li><a class="reference internal" href="#a-full-example" id="id12">A full example</a></li>
<li><a class="reference internal" href="#results-examples" id="id13">Results examples</a></li>
<li><a class="reference internal" href="#managed-docstrings-examples" id="id14">Managed docstrings examples</a></li>
</ul>
</li>
<li><a class="reference internal" href="#contact-contributing" id="id15">Contact/Contributing</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="introduction">
<h2><a class="toc-backref" href="#id3">Introduction</a><a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h2>
<p>Pyment is a software allowing to create, update or convert several docstrings formats in existing Python files.
So it should help Python programmers to enhance inside code documentation using docstrings.</p>
<p>It should be useful for code not yet documented, not well documented, or partially documented and also to harmonize files using several docstring formats.</p>
<p>Pyment will then be helpful to harmonize or change a project docstring style format.</p>
<div class="section" id="how-does-it-work">
<h3><a class="toc-backref" href="#id4">How does it work</a><a class="headerlink" href="#how-does-it-work" title="Permalink to this headline">¶</a></h3>
<p>Pyment will parse one python file or several (automatically exploring a folder and its sub-folder) and retrieve existing docstrings.
Then, for each found function/method/class, it will generate a formatted docstrings with parameters, default values,…</p>
<p>At the end, depending on options, original files will be overwritten or patches will be generated for each file, in which
case you just have to apply the patches.</p>
</div>
<div class="section" id="what-are-the-supported-formats">
<h3><a class="toc-backref" href="#id5">What are the supported formats</a><a class="headerlink" href="#what-are-the-supported-formats" title="Permalink to this headline">¶</a></h3>
<p>Currently, the managed styles are javadoc, reST (re-Structured Text, used by Sphinx), numpydoc, google, other groups (like Google).</p>
</div>
<div class="section" id="customization">
<h3><a class="toc-backref" href="#id6">Customization</a><a class="headerlink" href="#customization" title="Permalink to this headline">¶</a></h3>
<p>It is planed to provide a large customization properties. However, it is currently limited to some settings.</p>
<p>There are two ways to customize Pyment.</p>
<p>The first is using the command line options (<cite>pyment –help</cite>). The second is providing a configuration file as explained later in that document.</p>
</div>
</div>
<div class="section" id="using-pyment">
<h2><a class="toc-backref" href="#id7">Using Pyment</a><a class="headerlink" href="#using-pyment" title="Permalink to this headline">¶</a></h2>
<p>Pyment runs under Python 2.7+/3+. But if <em>argparser</em> is installed it can run under Python 2.6, and maybe less.</p>
<p>Pyment is usable as is on command line using pyment script. But it can also be used into a Python program.</p>
<div class="section" id="how-to-install">
<h3><a class="toc-backref" href="#id8">How to install</a><a class="headerlink" href="#how-to-install" title="Permalink to this headline">¶</a></h3>
<p>The better way is to get the latest version from Github:</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span>git clone git@github.com:dadadel/pyment.git <span class="c1"># or https://github.com/dadadel/pyment.git</span>
<span class="nb">cd</span> pyment
python setup.py install
</pre></div>
</div>
<p>You can also get an archive of a released version <a class="reference external" href="https://github.com/dadadel/pyment/releases">from Github</a>.</p>
</div>
<div class="section" id="how-to-run">
<h3><a class="toc-backref" href="#id9">How to run</a><a class="headerlink" href="#how-to-run" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>To run Pyment from the command line the easiest way is to provide a Python file or a folder:</li>
</ul>
<div class="highlight-sh"><div class="highlight"><pre><span></span>pyment example.py
pyment folder/to/python/progs
</pre></div>
</div>
<ul class="simple">
<li>To get the available options, run:</li>
</ul>
<div class="highlight-sh"><div class="highlight"><pre><span></span>pyment -h
</pre></div>
</div>
<p>Will provide the output:</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span>usage: pyment <span class="o">[</span>-h<span class="o">]</span> <span class="o">[</span>-i style<span class="o">]</span> <span class="o">[</span>-o style<span class="o">]</span> <span class="o">[</span>-q quotes<span class="o">]</span> <span class="o">[</span>-f status<span class="o">]</span> <span class="o">[</span>-t<span class="o">]</span>
              <span class="o">[</span>-c config<span class="o">]</span> <span class="o">[</span>-d<span class="o">]</span> <span class="o">[</span>-p status<span class="o">]</span> <span class="o">[</span>-v<span class="o">]</span> <span class="o">[</span>-w<span class="o">]</span>
              path

Generates patches after <span class="o">(</span>re<span class="o">)</span>writing docstrings.

positional arguments:
  path                  python file or folder containing python files to
                        proceed <span class="o">(</span>explore also sub-folders<span class="o">)</span>

optional arguments:
  -h, --help            show this <span class="nb">help</span> message and <span class="nb">exit</span>
  -i style, --input style
                        Input docstring style in <span class="o">[</span><span class="s2">&quot;javadoc&quot;</span>, <span class="s2">&quot;reST&quot;</span>,
                        <span class="s2">&quot;numpydoc&quot;</span>, <span class="s2">&quot;google&quot;</span>, <span class="s2">&quot;auto&quot;</span><span class="o">]</span> <span class="o">(</span>default autodetected<span class="o">)</span>
  -o style, --output style
                        Output docstring style in <span class="o">[</span><span class="s2">&quot;javadoc&quot;</span>, <span class="s2">&quot;reST&quot;</span>,
                        <span class="s2">&quot;numpydoc&quot;</span>, <span class="s2">&quot;google&quot;</span><span class="o">]</span> <span class="o">(</span>default <span class="s2">&quot;reST&quot;</span><span class="o">)</span>
  -q quotes, --quotes quotes
                        Type of docstring delimiter quotes: <span class="s1">&#39;&#39;&#39; or &quot;&quot;&quot;</span>
<span class="s1">                        (default &quot;&quot;&quot;). Note that you may escape the characters</span>
<span class="s1">                        using \ like \&#39;</span><span class="se">\&#39;\&#39;</span>, or surround it with the opposite
                        quotes like <span class="s2">&quot;&#39;&#39;&#39;&quot;</span>
  -f status, --first-line status
                        Does the comment starts on the first line after the
                        quotes <span class="o">(</span>default <span class="s2">&quot;True&quot;</span><span class="o">)</span>
  -t, --convert         Existing docstrings will be converted but won<span class="s1">&#39;t create</span>
<span class="s1">                        missing ones</span>
<span class="s1">  -c config, --config-file config</span>
<span class="s1">                        Get a Pyment configuration from a file. Note that the</span>
<span class="s1">                        config values will overload the command line ones.</span>
<span class="s1">  -d, --init2class      If no docstring to class, then move the __init__ one</span>
<span class="s1">  -p status, --ignore-private status</span>
<span class="s1">                        Don&#39;</span>t proceed the private methods/functions starting
                        with __ <span class="o">(</span>two underscores<span class="o">)</span> <span class="o">(</span>default <span class="s2">&quot;True&quot;</span><span class="o">)</span>
  -v, --version         show program<span class="s1">&#39;s version number and exit</span>
<span class="s1">  -w, --write           Don&#39;</span>t write patches. Overwrite files instead.
</pre></div>
</div>
<ul class="simple">
<li>To run the unit-tests:</li>
</ul>
<div class="highlight-sh"><div class="highlight"><pre><span></span>python setup.py <span class="nb">test</span>
</pre></div>
</div>
<ul class="simple">
<li>To run from a Python program:</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">pyment</span> <span class="kn">import</span> <span class="n">PyComment</span>

<span class="n">filename</span> <span class="o">=</span> <span class="s1">&#39;test.py&#39;</span>

<span class="n">c</span> <span class="o">=</span> <span class="n">PyComment</span><span class="p">(</span><span class="n">filename</span><span class="p">)</span>
<span class="n">c</span><span class="o">.</span><span class="n">proceed</span><span class="p">()</span>
<span class="n">c</span><span class="o">.</span><span class="n">diff_to_file</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="n">filename</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;.patch&quot;</span><span class="p">)</span>
<span class="k">for</span> <span class="n">s</span> <span class="ow">in</span> <span class="n">c</span><span class="o">.</span><span class="n">get_output_docs</span><span class="p">():</span>
    <span class="k">print</span><span class="p">(</span><span class="n">s</span><span class="p">)</span>
</pre></div>
</div>
<p>Note that a documentation will be provided later. Now you can use Python introspection like: <em>&gt;&gt;&gt; help(PyComment)</em></p>
</div>
</div>
<div class="section" id="configuration-file">
<h2><a class="toc-backref" href="#id10">Configuration file</a><a class="headerlink" href="#configuration-file" title="Permalink to this headline">¶</a></h2>
<p>You can provide a configuration file to manage some settings.</p>
<p>Note that if you use command line parameters that are also set in the
configuration file, then the command line ones will be ignored.</p>
<p>The configuration parameters that you can set are:</p>
<ul>
<li><p class="first"><strong>first_line</strong></p>
<blockquote>
<div><p><em>True or False</em></p>
</div></blockquote>
</li>
</ul>
<p>Set to <strong>True</strong> then for each docstring, the description should start on the first
line, just after the quotes. In the other case the description will start on the
second line.</p>
<ul>
<li><p class="first"><strong>quotes</strong></p>
<blockquote>
<div><p><em>‘’’ or “”“</em></p>
</div></blockquote>
</li>
</ul>
<p>The quotes used for the docstring limits.</p>
<ul>
<li><p class="first"><strong>output_style</strong></p>
<blockquote>
<div><p><em>javadoc, reST, numpydoc, groups</em></p>
</div></blockquote>
</li>
</ul>
<p>The output format for the docstring.</p>
<ul>
<li><p class="first"><strong>input_style</strong></p>
<blockquote>
<div><p><em>auto, javadoc, reST, numpydoc, groups</em></p>
</div></blockquote>
</li>
</ul>
<p>The input format for the docstring interpretation. Set to <strong>auto</strong> if you want
Pyment to autodetect for each docstring its format.</p>
<ul>
<li><p class="first"><strong>init2class</strong></p>
<blockquote>
<div><p><em>True or False</em></p>
</div></blockquote>
</li>
</ul>
<p>Set to <strong>True</strong> to move the generated docstring for __init__ to the class docstring.
If there was already a docstring for the class, then the __init__ will conserve
its docstring and the class its own.</p>
<ul>
<li><p class="first"><strong>convert_only</strong></p>
<blockquote>
<div><p><em>True or False</em></p>
</div></blockquote>
</li>
</ul>
<p>Set to <strong>True</strong> if you want only to convert existing docstring.
So Pyment won’t create missing docstrings.</p>
<p><strong>Todo…</strong></p>
<ul class="simple">
<li>Add other command line options</li>
<li><em>optional/excluded sections</em></li>
</ul>
<p>Pyment will ignore some sections (like <em>raises</em>) or will generate some sections only if there was an existing corresponding section in input docstring.</p>
</div>
<div class="section" id="examples">
<h2><a class="toc-backref" href="#id11">Examples</a><a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="section" id="a-full-example">
<h3><a class="toc-backref" href="#id12">A full example</a><a class="headerlink" href="#a-full-example" title="Permalink to this headline">¶</a></h3>
<p>Here is a full example using Pyment to generate a patch and then apply the patch.</p>
<p>Let’s consider a file <em>test.py</em> with following content:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">func</span><span class="p">(</span><span class="n">param1</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">param2</span><span class="o">=</span><span class="s1">&#39;default val&#39;</span><span class="p">):</span>
    <span class="sd">&#39;&#39;&#39;Description of func with docstring groups style (Googledoc).</span>

<span class="sd">    Params:</span>
<span class="sd">        param1 - descr of param1 that has True for default value.</span>
<span class="sd">        param2 - descr of param2</span>

<span class="sd">    Returns:</span>
<span class="sd">        some value</span>

<span class="sd">    Raises:</span>
<span class="sd">        keyError: raises key exception</span>
<span class="sd">        TypeError: raises type exception</span>

<span class="sd">    &#39;&#39;&#39;</span>
    <span class="k">pass</span>

<span class="k">class</span> <span class="nc">A</span><span class="p">:</span>
    <span class="k">def</span> <span class="nf">method</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">param1</span><span class="p">,</span> <span class="n">param2</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
        <span class="k">pass</span>
</pre></div>
</div>
<p>Now let’s use Pyment:</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span>$ pyment test.py
</pre></div>
</div>
<p>Using Pyment without any argument will autodetect the docstrings formats and generate a patch using the reStructured Text format.
So the previous command has generated the file <em>test.py.patch</em> with following content:</p>
<div class="highlight-diff"><div class="highlight"><pre><span></span># Patch generated by Pyment v0.2.0

<span class="gd">--- a/test.py</span>
<span class="gi">+++ b/test.py</span>
<span class="gu">@@ -1,20 +1,22 @@</span>
 def func(param1=True, param2=&#39;default val&#39;):
<span class="gd">-    &#39;&#39;&#39;Description of func with docstring groups style (Googledoc).</span>
<span class="gi">+    &quot;&quot;&quot;Description of func with docstring groups style (Googledoc).</span>

<span class="gd">-    Params:</span>
<span class="gd">-        param1 - descr of param1 that has True for default value.</span>
<span class="gd">-        param2 - descr of param2</span>
<span class="gi">+    :param param1: descr of param1 that has True for default value</span>
<span class="gi">+    :param param2: descr of param2 (Default value = &#39;default val&#39;)</span>
<span class="gi">+    :returns: some value</span>
<span class="gi">+    :raises keyError: raises key exception</span>
<span class="gi">+    :raises TypeError: raises type exception</span>

<span class="gd">-    Returns:</span>
<span class="gd">-        some value</span>
<span class="gd">-</span>
<span class="gd">-    Raises:</span>
<span class="gd">-        keyError: raises key exception</span>
<span class="gd">-        TypeError: raises type exception</span>
<span class="gd">-</span>
<span class="gd">-    &#39;&#39;&#39;</span>
<span class="gi">+    &quot;&quot;&quot;</span>
     pass

 class A:
<span class="gi">+    &quot;&quot;&quot; &quot;&quot;&quot;</span>
     def method(self, param1, param2=None):
<span class="gi">+        &quot;&quot;&quot;</span>
<span class="gi">+</span>
<span class="gi">+        :param param1:</span>
<span class="gi">+        :param param2:  (Default value = None)</span>
<span class="gi">+</span>
<span class="gi">+        &quot;&quot;&quot;</span>
         pass
</pre></div>
</div>
<p>Let’s finally apply the patch with the following command:</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span>$ patch -p1 &lt; test.py.patch
</pre></div>
</div>
<p>Now the original <em>test.py</em> was updated and its content is now:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">func</span><span class="p">(</span><span class="n">param1</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">param2</span><span class="o">=</span><span class="s1">&#39;default val&#39;</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Description of func with docstring groups style (Googledoc).</span>

<span class="sd">    :param param1: descr of param1 that has True for default value</span>
<span class="sd">    :param param2: descr of param2 (Default value = &#39;default val&#39;)</span>
<span class="sd">    :returns: some value</span>
<span class="sd">    :raises keyError: raises key exception</span>
<span class="sd">    :raises TypeError: raises type exception</span>

<span class="sd">    &quot;&quot;&quot;</span>
    <span class="k">pass</span>

<span class="k">class</span> <span class="nc">A</span><span class="p">:</span>
    <span class="sd">&quot;&quot;&quot; &quot;&quot;&quot;</span>
    <span class="k">def</span> <span class="nf">method</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">param1</span><span class="p">,</span> <span class="n">param2</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>

<span class="sd">        :param param1:</span>
<span class="sd">        :param param2:  (Default value = None)</span>

<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">pass</span>
</pre></div>
</div>
</div>
<div class="section" id="results-examples">
<h3><a class="toc-backref" href="#id13">Results examples</a><a class="headerlink" href="#results-examples" title="Permalink to this headline">¶</a></h3>
<p>Refer to the files <a class="reference external" href="https://github.com/dadadel/pyment/blob/master/example_numpy.py.patch">example.py.patch</a> or <a class="reference external" href="https://github.com/dadadel/pyment/blob/master/example_numpy.py.patch">example.py.patch</a> to see what kind of results can be obtained.</p>
<p>The 1st patch was generated using the following command:</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span>pyment -f <span class="nb">false</span> example.py
</pre></div>
</div>
<p>And the second using:</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span>pyment -f <span class="nb">false</span> -o numpydoc example.py
</pre></div>
</div>
</div>
<div class="section" id="managed-docstrings-examples">
<h3><a class="toc-backref" href="#id14">Managed docstrings examples</a><a class="headerlink" href="#managed-docstrings-examples" title="Permalink to this headline">¶</a></h3>
<p>There follows some examples of docstrings that can be recognized or generated.</p>
<ul class="simple">
<li>“javadoc” style:</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">This is a javadoc style.</span>

<span class="sd">@param param1: this is a first param</span>
<span class="sd">@param param2: this is a second param</span>
<span class="sd">@return: this is a description of what is returned</span>
<span class="sd">@raise keyError: raises an exception</span>
<span class="sd">&quot;&quot;&quot;</span>
</pre></div>
</div>
<ul class="simple">
<li>“reST” style (the kind managed by Sphinx):</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">This is a reST style.</span>

<span class="sd">:param param1: this is a first param</span>
<span class="sd">:type param1: str</span>
<span class="sd">:param param2: this is a second param</span>
<span class="sd">:type param2: int</span>
<span class="sd">:returns: this is a description of what is returned</span>
<span class="sd">:rtype: bool</span>
<span class="sd">:raises keyError: raises an exception</span>
<span class="sd">&quot;&quot;&quot;</span>
</pre></div>
</div>
<ul class="simple">
<li>“google” style:</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">This is a Google style docs.</span>

<span class="sd">Args:</span>
<span class="sd">  param1(str): this is the first param</span>
<span class="sd">  param2(int, optional): this is a second param</span>

<span class="sd">Returns:</span>
<span class="sd">    bool: This is a description of what is returned</span>

<span class="sd">Raises:</span>
<span class="sd">    KeyError: raises an exception</span>
<span class="sd">&quot;&quot;&quot;</span>
</pre></div>
</div>
<ul class="simple">
<li>“numpydoc” style:</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">My numpydoc description of a kind</span>
<span class="sd">of very exhautive numpydoc format docstring.</span>

<span class="sd">Parameters</span>
<span class="sd">----------</span>
<span class="sd">first : array_like</span>
<span class="sd">    the 1st param name `first`</span>
<span class="sd">second :</span>
<span class="sd">    the 2nd param</span>
<span class="sd">third : {&#39;value&#39;, &#39;other&#39;}, optional</span>
<span class="sd">    the 3rd param, by default &#39;value&#39;</span>

<span class="sd">Returns</span>
<span class="sd">-------</span>
<span class="sd">string</span>
<span class="sd">    a value in a string</span>

<span class="sd">Raises</span>
<span class="sd">------</span>
<span class="sd">KeyError</span>
<span class="sd">    when a key error</span>
<span class="sd">OtherError</span>
<span class="sd">    when an other error</span>

<span class="sd">See Also</span>
<span class="sd">--------</span>
<span class="sd">a_func : linked (optional), with things to say</span>
<span class="sd">         on several lines</span>
<span class="sd">some blabla</span>

<span class="sd">Note</span>
<span class="sd">----</span>
<span class="sd">Some informations.</span>

<span class="sd">Some maths also:</span>
<span class="sd">.. math:: f(x) = e^{- x}</span>

<span class="sd">References</span>
<span class="sd">----------</span>
<span class="sd">Biblio with cited ref [1]_. The ref can be cited in Note section.</span>

<span class="sd">.. [1] Adel Daouzli, Sylvain Saïghi, Michelle Rudolph, Alain Destexhe,</span>
<span class="sd">   Sylvie Renaud: Convergence in an Adaptive Neural Network:</span>
<span class="sd">   The Influence of Noise Inputs Correlation. IWANN (1) 2009: 140-148</span>

<span class="sd">Examples</span>
<span class="sd">--------</span>
<span class="sd">This is example of use</span>
<span class="sd">&gt;&gt;&gt; print &quot;a&quot;</span>
<span class="sd">a</span>

<span class="sd">&quot;&quot;&quot;</span>
</pre></div>
</div>
<ul class="simple">
<li>other “groups” style:</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">This is a groups style docs.</span>

<span class="sd">Parameters:</span>
<span class="sd">    param1 - this is the first param</span>
<span class="sd">    param2 - this is a second param</span>

<span class="sd">Returns:</span>
<span class="sd">    This is a description of what is returned</span>

<span class="sd">Raises:</span>
<span class="sd">    KeyError - raises an exception</span>
<span class="sd">&quot;&quot;&quot;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="contact-contributing">
<h2><a class="toc-backref" href="#id15">Contact/Contributing</a><a class="headerlink" href="#contact-contributing" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Contact</li>
</ul>
<p>There is a dedicated <strong>IRC</strong> channel on <strong>Freenode</strong>: <strong>#pyment</strong>. The developer is <em>dadel</em>.</p>
<p>You can also send him an email to daouzli AT gmail DOT com (please head your subject with <em>[Pyment]</em>).</p>
<ul class="simple">
<li>Contribute</li>
</ul>
<p>Concerning contributing, note that the development is in early steps, and the global code arrangement can change, especially concerning making easier to add new format support.
However you can contribute by opening issues, proposing pull requests, or contacting directly the developer.</p>
<p>The tests are unfortunately not good enough, so you can contribute in that field, that would be really great!
An other useful way to contribute should be to create a plugin for you favorite IDE.
You can also find in the code some TODOs, not always up-to-date.</p>
<ul class="simple">
<li>Donate</li>
</ul>
<p>If you enjoyed this free software, and want to donate you can give me some bitcoins, I would be happy :)</p>
<p>Here’s my address for bitcoins : 1Kz5bu4HuRtwbjzopN6xWSVsmtTDK6Kb89</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Reference documentation</a><ul>
<li><a class="reference internal" href="#introduction">Introduction</a><ul>
<li><a class="reference internal" href="#how-does-it-work">How does it work</a></li>
<li><a class="reference internal" href="#what-are-the-supported-formats">What are the supported formats</a></li>
<li><a class="reference internal" href="#customization">Customization</a></li>
</ul>
</li>
<li><a class="reference internal" href="#using-pyment">Using Pyment</a><ul>
<li><a class="reference internal" href="#how-to-install">How to install</a></li>
<li><a class="reference internal" href="#how-to-run">How to run</a></li>
</ul>
</li>
<li><a class="reference internal" href="#configuration-file">Configuration file</a></li>
<li><a class="reference internal" href="#examples">Examples</a><ul>
<li><a class="reference internal" href="#a-full-example">A full example</a></li>
<li><a class="reference internal" href="#results-examples">Results examples</a></li>
<li><a class="reference internal" href="#managed-docstrings-examples">Managed docstrings examples</a></li>
</ul>
</li>
<li><a class="reference internal" href="#contact-contributing">Contact/Contributing</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="index.html"
                        title="previous chapter">Welcome to Pyment’s documentation!</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="pyment_doc.html"
                        title="next chapter">Source code documentation</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/pyment.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="pyment_doc.html" title="Source code documentation"
             >next</a> |</li>
        <li class="right" >
          <a href="index.html" title="Welcome to Pyment’s documentation!"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">Pyment 0.3.2 documentation</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2017, Daouzli Adel.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.4.
    </div>
  </body>
</html>